package com.winit.page.model;

import com.winit.common.util.treeUtils.NodeElement;
import com.winit.common.util.treeUtils.NodeType;
import org.springframework.data.annotation.Transient;
import org.springframework.data.cassandra.mapping.Column;
import org.springframework.data.cassandra.mapping.PrimaryKey;
import org.springframework.data.cassandra.mapping.Table;

import java.io.Serializable;
import java.util.List;

@NodeType(name = "page")
@Table("matrix_page")
public class Page implements Serializable {
    @NodeElement(name = {"id"})
    @PrimaryKey
    @Column("id")
    private String id;
    @NodeElement(name = {"parentId"})
    @Column("ref_menu_id")
    private String menuId;
    @Column("menu_path")
    private String menuPath;
    @Column("file_name")
    private String fileName;
    @Column("models")
    private String models;
    @NodeElement(name = {"name"})
    @Column("title")
    private String title;
    @Column(value = "children")
    private List<String> children;

    @Transient
    private String parent_id;

    public String getParent_id() {
        return parent_id;
    }

    public void setParent_id(String parent_id) {
        this.parent_id = parent_id;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMenuId() {
        return menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    public String getMenuPath() {
        return menuPath;
    }

    public void setMenuPath(String menuPath) {
        this.menuPath = menuPath;
    }

    public String getModels() {
        return models;
    }

    public void setModels(String models) {
        this.models = models;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<String> getChildren() {
        return children;
    }

    public void setChildren(List<String> children) {
        this.children = children;
    }
}
